import request from "@/utils/request";

// 满意度调查类型树查询
export function getTypeListTree(data) {
  return request({
    url: "/api/questionnaire/OqQuestionnaireType/getListTree",
    method: "GET",
    data,
  });
}

//满意度调查编码和名称重复查询
export function getTypeList(data) {
  return request({
    url: "/api/questionnaire/OqQuestionnaireType/judgeRepeatByCodeAndName",
    method: "GET",
    data,
  });
}

// 删除类型
export const delQuestionnaireType = (id) => {
  return request({
    url: `/api/questionnaire/OqQuestionnaireType/${id}`,
    method: "DELETE",
  });
};

//问卷调查模板编码和名称重复查询
export function getQuestionnaireTypeList(data) {
  return request({
    url: "/api/questionnaire/OqQuestionnaire/judgeRepeatByCodeAndName",
    method: "GET",
    data,
  });
}

//问卷调查模板编码和名称重复查询
export function getOrderTypeList(data) {
  return request({
    url: "/api/questionnaire/OqQuestionnaireOrder/judgeRepeatByCodeAndName",
    method: "GET",
    data,
  });
}
// 答题情况
export function getAnswerSituation(data) {
  return request({
    url: "/api/questionnaire/OqQuestionnaireOrderRangeItem/getAnswerSituation",
    method: "post",
    data,
  });
}
